

import 'package:flutter/material.dart';
import 'package:flutter_getx/res/colors/colors.dart';
import 'package:flutter_getx/res/colors/colors_dark.dart';
import 'package:flutter_getx/res/colors/theme_colors.dart';
import 'package:flutter_getx/res/dimens/dimens.dart';
import 'package:get/get.dart';

Widget tipTitle(String title,
    {EdgeInsetsGeometry padding = EdgeInsets.zero, TextStyle? style}) {
  return Padding(
    padding: padding,
    child: Row(
      children: [
        Container(
          width: Dp.dp_5,
          height: Dp.dp_9,
          decoration: BoxDecoration(
            gradient: gradientTheme(),
          ),
        ),
        SizedBox(width: Dp.dp_4,),
        Text(title, style: style ?? subtitle1.copyWith(fontWeight: FontWeight.w600),)
      ],
    ),
  );
}

LinearGradient gradientTheme(){
  return LinearGradient(colors: Get.isDarkMode ? [gradientStartDark, gradientEndDark] : [gradientStart, gradientEnd]);
}